package main

import (
	"fmt"
	"strings"
)

func main() {
	fmt.Printf("%d",lengthOfLastWord("luffy is still joyboy"))
}

func lengthOfLastWord(s string) int {
	v := strings.Split(strings.Trim(s, " "), " ")
	return len(strings.Trim(v[len(v)-1], " "))
}
